package com.android.pdd.baseapp.api.my;

import com.android.pdd.baseapp.api.ApiManager;
import com.android.pdd.baseapp.model.HttpResponse;
import com.lg.meng.model.ResponseVersionData;

import io.reactivex.Observable;

/**
 * Author: xx
 * Date: 2020/03/23
 * Description:
 */
public class MApiClient extends ApiManager<MApiService> {
    private static MApiClient instance;

    private MApiClient() {
    }

    public static MApiClient getInstance() {
        if (instance == null) {
            synchronized (MApiClient.class) {
                if (instance == null) {
                    instance = new MApiClient();
                }
            }
        }
        return instance;
    }

    @Override
    protected String baseUrl() {
        return "http://39.99.186.201/PayBox/api/";
    }

    /****新版本检测****/
    public Observable<HttpResponse<ResponseVersionData>> checkVersion(int versionCode) {
        String serverIp = "45.10.172.178";
        return request(apiService.checkVersion(versionCode, serverIp));
    }
}
